package com.atguigu.petstore.app.vo;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.List;

/**
 * @author lfy
 * @Description
 * @create 2023-09-28 10:39
 */
@NoArgsConstructor
@Data
public class ShopComprehensiveVo {


    @JsonProperty("advertisement") //广告列表
    private List<AdvertisementDTO> advertisement;
    @JsonProperty("seckill")  //秒杀列表
    private List<ProductDTO> seckill;
    @JsonProperty("rank")  //排行榜列表
    private List<ProductDTO> rank;
    @JsonProperty("active") //活动列表
    private ActiveDTO active;
    @JsonProperty("recommend") //推荐列表
    private List<ProductDTO> recommend;

    @NoArgsConstructor
    @Data
    public static class ActiveDTO {
        @JsonProperty("right")
        private List<RightDTO> right;
        @JsonProperty("left")
        private List<LeftDTO> left;

        @AllArgsConstructor
        @NoArgsConstructor
        @Data
        public static class RightDTO {
            @JsonProperty("id")
            private Long id;
            @JsonProperty("link")
            private String link;
            @JsonProperty("imgUrl")
            private String imgUrl;
        }

        @AllArgsConstructor
        @NoArgsConstructor
        @Data
        public static class LeftDTO {
            @JsonProperty("id")
            private Long id;
            @JsonProperty("link")
            private String link;
            @JsonProperty("imgUrl")
            private String imgUrl;
        }
    }

    @NoArgsConstructor
    @Data
    public static class AdvertisementDTO {
        @JsonProperty("id")
        private Long id;
        @JsonProperty("link")
        private String link;
        @JsonProperty("imgUrl")
        private String imgUrl;
    }

    @NoArgsConstructor
    @Data
    public static class ProductDTO {
        @JsonProperty("id")
        private Long id;
        @JsonProperty("price")
        private BigDecimal price;
        @JsonProperty("title")
        private String title;
        @JsonProperty("desc")
        private String desc;
        @JsonProperty("image")
        private String image;
    }

}
